package csu.web.mypetstore.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;


import java.io.Serializable;


@TableName(value ="product")

public class Product implements Serializable {

    private String productid;
    private String category;
    private String name;
    private String descn;
    @TableField(exist = false)
    private String image;
    @TableField(exist = false)
    private String description;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    public String getImage() {

        int index = this.descn.indexOf("/");
        return this.descn.substring(0, index);
    }
    public String getDescription() {

        int index = this.descn.indexOf("/");

        return this.descn.substring(index+1);
    }

    public String getProductid() {
        return productid;
    }

    public void setProductid(String productid) {
        this.productid = productid;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescn() {
        return descn;
    }

    public void setDescn(String descn) {
        this.descn = descn;
    }
}